View Javadoc
1 /* 2 AntMake 3 4 Copyright (C) 2004 Jose San Leandro Armend?riz 5 jsanleandro@yahoo.es 6 chousz@yahoo.com 7 8 This library is free software; you can redistribute it and/or 9 modify it under the terms of the GNU General Public 10 License as published by the Free Software Foundation; either 11 version 2 of the License, or (at your option) any later version. 12 13 This library is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 General Public License for more details. 17 18 You should have received a copy of the GNU General Public 19 License along with this library; if not, write to the Free Software 20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 22 Thanks to ACM S.L. for distributing this library under the GPL license. 23 Contact info: jsr000@terra.es 24 Postal Address: c/Playa de Lagoa, 1 25 Urb. Valdecaba?as 26 Boadilla del monte 27 28660 Madrid 28 Spain 29 30 ****************************************************************************** 31 This class is based on RCSFile 32 included in Ant distribution, and whose license details 33 are the following. 34 35 * 36 * The Apache Software License, Version 1.1 37 * 38 * Copyright (c) 2002 The Apache Software Foundation. All rights 39 * reserved. 40 * 41 * Redistribution and use in source and binary forms, with or without 42 * modification, are permitted provided that the following conditions 43 * are met: 44 * 45 * 1. Redistributions of source code must retain the above copyright 46 * notice, this list of conditions and the following disclaimer. 47 * 48 * 2. Redistributions in binary form must reproduce the above copyright 49 * notice, this list of conditions and the following disclaimer in 50 * the documentation and/or other materials provided with the 51 * distribution. 52 * 53 * 3. The end-user documentation included with the redistribution, if 54 * any, must include the following acknowlegement: 55 * "This product includes software developed by the 56 * Apache Software Foundation (http://www.apache.org/)." 57 * Alternately, this acknowlegement may appear in the software itself, 58 * if and wherever such third-party acknowlegements normally appear. 59 * 60 * 4. The names "Ant" and "Apache Software 61 * Foundation" must not be used to endorse or promote products derived 62 * from this software without prior written permission. For written 63 * permission, please contact apache@apache.org. 64 * 65 * 5. Products derived from this software may not be called "Apache" 66 * nor may "Apache" appear in their names without prior written 67 * permission of the Apache Group. 68 * 69 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 70 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 71 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 72 * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR 73 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 74 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 75 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 76 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 77 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 78 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 79 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 80 * SUCH DAMAGE. 81 * ==================================================================== 82 * 83 * This software consists of voluntary contributions made by many 84 * individuals on behalf of the Apache Software Foundation. For more 85 * information on the Apache Software Foundation, please see 86 * <http://www.apache.org/>. 87 * 88 89 ****************************************************************************** 90 * 91 * Filename: $RCSfile: AntMakeTask.java,v $ 92 * 93 * Author: Jose San Leandro Armend?riz 94 * 95 * Description: Models RCS files. 96 * 97 * Last modified by: $Author: chous $ at $Date: 2004/01/24 11:17:06 $ 98 * 99 * File version: $Revision: 1.8 $ 100 * 101 * Project version: $Name: $ 102 * 103 * $Id: AntMakeTask.java,v 1.8 2004/01/24 11:17:06 chous Exp $ 104 * 105 */ 106 package org.acmsl.antmake; 107 108 /* 109 * Importing JDK classes. 110 */ 111 import java.util.ArrayList; 112 import java.util.Collection; 113 import java.util.Date; 114 115 /*** 116 * Models RCS files. 117 * @author <a href="mailto:jsanleandro@yahoo.es" 118 >Jose San Leandro</a>, based on 119 * <a href="mailto:peter@apache.org">Peter Donald</a> and 120 * <a href="mailto:jeff.martin@synamic.co.uk">Jeff Martin</a>'s 121 * RCSFile. It's package-protected, so it had to be basically copied 122 * and pasted. 123 * @version $Revision: 1.8 $ 124 * @see org.apache.tools.ant.taskdefs.cvslib.RCSFile 125 */ 126 public class RcsFile 127 { 128 /*** 129 * The name. 130 */ 131 private String m__strName; 132 133 /*** 134 * The revision. 135 */ 136 private String m__strRevision; 137 138 /*** 139 * The previous revision. 140 */ 141 private String m__strPreviousRevision; 142 143 /*** 144 * Creates a RcsFile with given information. 145 * @param name the name. 146 * @param revision the revision. 147 */ 148 public RcsFile(String name, String revision) 149 { 150 inmutableSetName(name); 151 inmutableSetRevision(revision); 152 } 153 154 /*** 155 * Creates a RcsFile with given information. 156 * @param name the name. 157 * @param revision the revision. 158 * @param previousRevision the previous revision. 159 */ 160 public RcsFile(String name, String revision, String previousRevision) 161 { 162 this(name, revision); 163 inmutableSetPreviousRevision(previousRevision); 164 } 165 166 /*** 167 * Specifies the name. 168 * @param name the name. 169 */ 170 private void inmutableSetName(String name) 171 { 172 m__strName = name; 173 } 174 175 /*** 176 * Specifies the name. 177 * @param name the name. 178 */ 179 protected void setName(String name) 180 { 181 inmutableSetName(name); 182 } 183 184 /*** 185 * Retrieves the name. 186 * @return such information. 187 */ 188 public String getName() 189 { 190 return m__strName; 191 } 192 193 /*** 194 * Specifies the revision. 195 * @param revision the revision. 196 */ 197 private void inmutableSetRevision(String revision) 198 { 199 m__strRevision = revision; 200 } 201 202 /*** 203 * Specifies the revision. 204 * @param revision the revision. 205 */ 206 protected void setRevision(String revision) 207 { 208 inmutableSetRevision(revision); 209 } 210 211 /*** 212 * Retrieves the revision. 213 * @return such information. 214 */ 215 public String getRevision() 216 { 217 return m__strRevision; 218 } 219 220 /*** 221 * Specifies the previous revision. 222 * @param previousRevision the previous revision. 223 */ 224 private void inmutableSetPreviousRevision(String previousRevision) 225 { 226 m__strPreviousRevision = previousRevision; 227 } 228 229 /*** 230 * Specifies the previous revision. 231 * @param previousRevision the previous revision. 232 */ 233 protected void setPreviousRevision(String previousRevision) 234 { 235 inmutableSetPreviousRevision(previousRevision); 236 } 237 238 /*** 239 * Retrieves the previous revision. 240 * @return such information. 241 */ 242 public String getPreviousRevision() 243 { 244 return m__strPreviousRevision; 245 } 246 } 247

This page was automatically generated by Maven